#include <stdio.h>
#include <wchar.h>
#include <locale.h>  // 设置本地化环境
#include "nutation.h"

int main() {
    // 设置本地化环境以支持宽字符
    setlocale(LC_ALL, "en_US.UTF-8");

    // 测试 nutation
    double t = 0.1; // 儒略世纪数
    double *nut = nutation(t, 0);
    wprintf(L"nutation: dL = %.6f, dE = %.6f\n", nut[0], nut[1]);

    // 测试 CDnutation
    double z[3] = {1.0, 0.5, 2.0};
    double E = 0.409093; // 黄赤交角
    double *cdnut = CDnutation(z, E, nut[0], nut[1]);
    wprintf(L"CDnutation: (%.6f, %.6f, %.6f)\n", cdnut[0], cdnut[1], cdnut[2]);

    // 测试 nutation2
    double *nut2 = nutation2(t);
    wprintf(L"nutation2: dL = %.6f, dE = %.6f\n", nut2[0], nut2[1]);

    // 测试 nutationLon2
    double nutLon = nutationLon2(t);
    wprintf(L"nutationLon2: %.6f\n", nutLon);

    return 0;
}